# -*- coding: utf-8 -*-
from datetime import timedelta
from utils.operators.spark_submit import SparkSubmitOperator
from jms.dm.dm_waybill_prescription_reach_details import jms_dm__dm_waybill_prescription_reach_details_dt

dm__dm_tiktok_data = SparkSubmitOperator(
    task_id='dm__dm_tiktok_data',
    email=['shenjiaming@jtexpress.com','yl_bigdata@yl-scm.com'],
    name='dm__dm_tiktok_data',
    # sla=timedelta(hours=7),
    pool_slots=5,
    driver_memory='4G',
    executor_memory='4G',
    executor_cores=2,
    num_executors=20,
    # jars='hdfs:///scheduler/jms/spark/hj/tiktok_data/common-1.0-SNAPSHOT.jar',  # 依赖 jar 包
    # application='hdfs:///scheduler/jms/spark/hj/tiktok_data/original-jobs-1.0-SNAPSHOT.jar',  # spark jar 包
    jars='hdfs:///scheduler/jms/spark/sjm/tiktok_data/common-1.0-SNAPSHOT.jar',  # 依赖 jar 包
    application='hdfs:///scheduler/jms/spark/sjm/tiktok_data/original-jobs-1.0-SNAPSHOT.jar',  # spark jar 包
    java_class='com.yunlu.bigdata.jobs.export.TiktokDataNew',  # spark 主类
    application_args=['{{ execution_date | cst_ds }}'],
    execution_timeout=timedelta(hours=3),
    # jars='hdfs:///user/spark/work/dm/hejian/tiktok_data/common-1.0-SNAPSHOT.jar',  # 依赖 jar 包
    # application='hdfs:///user/spark/work/dm/hejian/tiktok_data/original-jobs-1.0-SNAPSHOT.jar',  # spark jar 包

)

dm__dm_tiktok_data << [jms_dm__dm_waybill_prescription_reach_details_dt]
